Repository navigation
feat(install): skip the download when that version is already installed - #2
Merged
Merged
Conversation
The /agent ready_ setup prompt always starts with install.sh. On a machine where gc is already there (the AgentFleet image bakes it into /usr/local/bin) that left a second, never-updated copy in ~/.local/bin. Now install.sh checks the install dir and `gc` on PATH against the wanted version (--version, else the latest release via the /releases/latest redirect) and only prints the next steps when it matches. --force reinstalls. After an install it notes when another gc earlier on PATH shadows the new one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKSbCZZYkipdDF4AueeXC9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Christoph on GC https://groundcontrol.makerslab.ai/tasks/c680a4fa-6c5c-49eb-982e-596d8c6c061d ("Bitte toolkit anpassen, dass gecheckt wird, ob es die Version schon gibt").
Why: the
/agent ready_prompt always starts withinstall.sh. The AgentFleet image shipsgcin/usr/local/bin(ai-assistant-installation #368), so running the prompt there left a second, never-updated copy in~/.local/bin.What
install.shcompares the wanted version with<install-dir>/gcand withgconPATH. The wanted version is--version, or else the latest release read off GitHub's/releases/latestredirect. On a match it prints "already installed — nothing to download" plus the next steps, using the path that has it.--forcereinstalls anyway.GC_INSTALL_BASE), it installs as before.gcearlier onPATHshadows the new one.installed_versiononly accepts output of the formgc X.Y.Z, with stdin set to/dev/null. Graphviz'sgctherefore does not count as a match and cannot block on stdin.Tested (macOS arm64, clean PATH)
--version(latest = 0.1.0)--forcegcgcearlier on PATHgo vet,go test ./...andvalidate-skills.share green.🤖 Generated with Claude Code
https://claude.ai/code/session_01RKSbCZZYkipdDF4AueeXC9